# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python

class Recipe(recipe.Recipe):
    name = 'libnice'
    version = '0.1.13'
    stype = SourceType.TARBALL
    url = 'http://nice.freedesktop.org/releases/%(name)s-%(version)s.tar.gz'
    licenses = [License.LGPLv2_1Plus, License.MPLv1_1]
    configure_options = '--enable-static --enable-static-plugins --enable-shared \
            --with-gstreamer --without-gstreamer-0.10 \
            --enable-compile-warnings=maximum --disable-gtk-doc'
    deps = ['glib', 'gtk-doc-lite', 'gstreamer-1.0']
    autoreconf = True
    patches = [
        "libnice/0001-agent-Remove-unnecessary-NULL-check.patch",
        "libnice/0002-Do-not-update-a-remote-candidate-s-type.patch",
        "libnice/0003-Do-not-compare-scope-for-IPv6-address-when-scope-is-.patch",
        "libnice/0004-Removing-no-op-assignment.patch",
        "libnice/0001-nicesrc-spin-the-agent-mainloop-in-a-separate-thread.patch",
        "libnice/0001-TURN-allow-REALM-to-be-empty.patch",
        "libnice/0002-TURN-handle-437-Allocation-Mismatch-responses.patch"
    ]

    files_bins = ['stunbdc', 'stund']
    files_libs = ['libnice']
    files_devel = [
        'include/nice',
        'include/stun',
        'lib/pkgconfig/nice.pc',
    ]
    files_plugins_net = ['lib/gstreamer-1.0/libgstnice%(mext)s']
    files_plugins_net_devel = [
        'lib/gstreamer-1.0/libgstnice.a', 'lib/gstreamer-1.0/libgstnice.la',
    ]
    # FIXME - if_arp.h? (iOS)
